﻿<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title></title>
<link href="${root!}/lib/ligerUI/skins/Aqua/css/ligerui-all.css" rel="stylesheet" type="text/css" />
<link href="${root!}/lib/ligerUI/skins/ligerui-icons.css" rel="stylesheet" type="text/css" />
<script src="${root!}/lib/jquery/jquery-1.3.2.min.js" type="text/javascript"></script>
<script src="${root!}/lib/ligerUI/js/core/base.js" type="text/javascript"></script>
<script src="${root!}/lib/ligerUI/js/plugins/ligerToolBar.js" type="text/javascript"></script>
<script src="${root!}/lib/ligerUI/js/ligerui.all.js" type="text/javascript"></script>
<script src="${root!}/lib/ligerUI/js/plugins/ligerForm.js"></script>
<script src="${root!}/lib/topteam.js"></script>
<script> 
var g = null;
var f = null;
var groupicon = "${root!}/lib/ligerUI/skins/icons/communication.gif";
$(function ()
{
	//<!--工具栏-->
	$("#toptoolbar").ligerToolBar({ items: [
		{text: 'RemoveUser', click: RemoveUser, icon:'memeber'},
		{ line:true },
	]
	});
	
	//<!--Form-->
	f = $("#form1").ligerForm({
		 inputWidth: 200, labelWidth: 90, space: 80,
		 fields: [
		 { display: "RemoteUser", name: "userName", newline: true, type: "text" , group: "Online_User_Information",groupicon: groupicon},
		 { display: "RemoteHost", name: "remoteHost", newline: false, type: "text" }
		 ]
	}); 
	
	//<!--DataGrid-->
	 g = $("#grid1").ligerGrid({
		columns: [
		  { display: 'RemoteUser', name: 'userName',width: 150 },
		  { display: 'RemoteHost', name: 'remoteHost',width: 150 },
		  { display: 'SessionId', name: 'sessionId',width: 280 },
		  { display: 'CreationTime', name: 'creationTime',width: 180 },
		  { display: 'LastAccessedTime', name: 'lastAccessedTime',width: 180 }		  
		], 		
		url: '${root!}/common/session/getOnLineUser', 
		pageSize: 10, 
		width: '99%', 
		height: '98%', 
		rownumbers: true,
	 	onSelectRow: function (data, rowindex, rowobj)
		{	
			f.setData(data);
		},
	}); 
});

function RemoveUser(){
	var row = f.getData();
	if (row['SessionId'] == "") 
	{ $.ligerDialog.success('Information : Please select the users you want to clean up!');
		return; 
	}
	do_ajaxSubmit1('','form1','${root!}/common/session/removeSessionContent');
}
</script>
</head>
<body>
<!--工具栏-->
<div id="toptoolbar" style="padding:3px; overflow:hidden;" ></div>
<!--form-->
<form id="form1"></form>
<!--datagrid-->
<div id="grid1" style="margin: 5px; padding: 0"></div> 
</body>
</html>
